import string
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template

class MainPage(webapp.RequestHandler):
  def get(self):
    self.response.headers['Content-Type'] = 'text/plain'
    self.response.out.write('goobotool-1.0')

class MyIpPage(webapp.RequestHandler):
  def get(self):
    r = self.request
    self.response.headers['Content-Type'] = 'text/plain'
    self.response.out.write(string.join([r.remote_addr, repr(r.headers) ], '\n'));

class SvnPage(webapp.RequestHandler):
  def get(self):
    path = os.path.join(os.path.dirname(__file__), 'svn.html')
    template_values
    self.response.out.write(template.render(path, template_values))
    #self.response.headers['Content-Type'] = 'text/html'
    
    self.response.out.write();
  def post(self):
    


application = webapp.WSGIApplication([('/', MainPage), ('/myip', MyIpPage)], debug=True)



def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()
